#include "DataStructure/Input/Constraint/RTRPLT1Data.h"

#include "DataStructure/Common/Validation.h"

using namespace SG::DataStructure;

/// @brief 判断两个RTRPLT1Data是否相等
/// @param a
/// @param b
/// @return
bool SG::DataStructure::FEM::operator== (const RTRPLT1Data& a, const RTRPLT1Data& b)
{
    if (a.m_id != b.m_id)
    {
        return false;
    }
    if (a.m_g[0] != b.m_g[0])
    {
        return false;
    }
    if (a.m_g[1] != b.m_g[1])
    {
        return false;
    }
    if (a.m_g[2] != b.m_g[2])
    {
        return false;
    }
    if (a.m_cMb != b.m_cMb)
    {
        return false;
    }
    if (a.m_cMc != b.m_cMc)
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_alpha, b.m_alpha))
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_tref, b.m_tref))
    {
        return false;
    }
    if (a.m_domainId != b.m_domainId)
    {
        return false;
    }
    return true;
}